﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using Luminji.Exam.Model.Papers;
using Luminji.Exam.Model.PaperTemplates;
using Luminji.Exam.Model.Subjects;
using Luminji.Exam.Model.Users;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.Configuration;

namespace Luminji.Exam.Model
{
    public static class ServiceIniter
    {
        static UnityContainer _container;
        /// <summary>
        /// Should be set first when the application start
        /// </summary>
        public static UnityContainer Container
        {
            get
            {
                if (_container == null)
                    throw new Exception("Container can not be null, init it first please");
                return _container;
            }
            set
            {
                _container = value;
            }
        }
    }
}
